<!DOCTYPE html>
<html lang="zh-cn" dir="ltr">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="基于Macbook M2芯片（主要原因是换电脑了，同时自己主学go语言，于是打算将Hexo换成Hugo，练练手)
https://copyfuture.com/blogs-details/20191229203259169ljtxcq9vmlzjyvf http://scarletsky.github.io/2019/05/02/migrate-hexo-to-hugo/ https://www.tomczhen.com/2019/06/04/getting-start-blog-with-hugo/ https://lequ7.com/guan-yu-hugo-bo-ke-qian-yi-zhi-lu-cong-hexo-huan-cheng-hugo.html https://blog.csdn.net/hqweay/article/details/101233371 搭建过程从头开始
环境安装 # 安装Homebrew # /bin/zsh -c &#34;$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)&#34; 根据提示安装Git
根据提示往下选择
运行 source /Users/wangb/.zprofile 运行brew doctor根据提示处理现有的问题
brew doctor 安装Golang # 查看可安装的golang版本
brew search go //最好使用手动安装，m2系列brew安装的go会出一些小问题 没找到什么原因 安装go环境：
brew install go@1.18//改成你喜欢的版本号 在.zshrc 文件中追加配置
vim ~/.zshrc 在文件最后输入一下内容：
export GOROOT=/usr/local/go export GOPATH=$HOME/go export GOBIN=$GOPATH/bin export PATH=$PATH:$GOROOT/bin:$GOBIN export GO111MODULE=on 按 Esc 键退回一般模式，然后输入 :wq 命令并回车保存退出文件。再使用以下命令使变量立即生效。
source .zshrc 由于Golang的官方代理源速度慢有时候会出现包不能下载的情况，我们使用以下命令把代理源设置为国内的代理源。
go env -w GOPROXY=https://goproxy.cn,direct 使用以下命令查看Golang版本信息。
go version go1.16.4 linux/amd64 使用以下命令查看Golang环境变量配置。">
<meta name="theme-color" content="#FFFFFF">
<meta name="color-scheme" content="light dark"><meta property="og:title" content="个人博客搭建Hugo" />
<meta property="og:description" content="基于Macbook M2芯片（主要原因是换电脑了，同时自己主学go语言，于是打算将Hexo换成Hugo，练练手)
https://copyfuture.com/blogs-details/20191229203259169ljtxcq9vmlzjyvf http://scarletsky.github.io/2019/05/02/migrate-hexo-to-hugo/ https://www.tomczhen.com/2019/06/04/getting-start-blog-with-hugo/ https://lequ7.com/guan-yu-hugo-bo-ke-qian-yi-zhi-lu-cong-hexo-huan-cheng-hugo.html https://blog.csdn.net/hqweay/article/details/101233371 搭建过程从头开始
环境安装 # 安装Homebrew # /bin/zsh -c &#34;$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)&#34; 根据提示安装Git
根据提示往下选择
运行 source /Users/wangb/.zprofile 运行brew doctor根据提示处理现有的问题
brew doctor 安装Golang # 查看可安装的golang版本
brew search go //最好使用手动安装，m2系列brew安装的go会出一些小问题 没找到什么原因 安装go环境：
brew install go@1.18//改成你喜欢的版本号 在.zshrc 文件中追加配置
vim ~/.zshrc 在文件最后输入一下内容：
export GOROOT=/usr/local/go export GOPATH=$HOME/go export GOBIN=$GOPATH/bin export PATH=$PATH:$GOROOT/bin:$GOBIN export GO111MODULE=on 按 Esc 键退回一般模式，然后输入 :wq 命令并回车保存退出文件。再使用以下命令使变量立即生效。
source .zshrc 由于Golang的官方代理源速度慢有时候会出现包不能下载的情况，我们使用以下命令把代理源设置为国内的代理源。
go env -w GOPROXY=https://goproxy.cn,direct 使用以下命令查看Golang版本信息。
go version go1.16.4 linux/amd64 使用以下命令查看Golang环境变量配置。" />
<meta property="og:type" content="article" />
<meta property="og:url" content="http://example.org/docs/%E5%8D%9A%E5%AE%A2/2022-08-27-%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BAhugo/" /><meta property="article:section" content="docs" />
<meta property="article:published_time" content="2022-08-27T12:11:30+00:00" />
<meta property="article:modified_time" content="2022-08-27T12:11:30+00:00" />

<title>个人博客搭建Hugo | Soulmate</title>
<link rel="manifest" href="/manifest.json">
<link rel="icon" href="/favicon.png" type="image/x-icon">
<link rel="stylesheet" href="/book.min.c58292d36b18b675680ab9baea2029204537b839ea72f258746ec0f32ce8d6c8.css" integrity="sha256-xYKS02sYtnVoCrm66iApIEU3uDnqcvJYdG7A8yzo1sg=" crossorigin="anonymous">
  <script defer src="/flexsearch.min.js"></script>
  <script defer src="/en.search.min.7d4a2df4b0464655ec51cd667723b235b8c0102457ac51664365cdfb0a14ab66.js" integrity="sha256-fUot9LBGRlXsUc1mdyOyNbjAECRXrFFmQ2XN&#43;woUq2Y=" crossorigin="anonymous"></script>
<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
-->
  
</head>
<body dir="ltr">
  <input type="checkbox" class="hidden toggle" id="menu-control" />
  <input type="checkbox" class="hidden toggle" id="toc-control" />
  <main class="container flex">
    <aside class="book-menu">
      <div class="book-menu-content">
        
  <nav>
<h2 class="book-brand">
  <a class="flex align-center" href="/"><img src="/logo.png" alt="Logo" /><span>Soulmate</span>
  </a>
</h2>


<div class="book-search">
  <input type="text" id="book-search-input" placeholder="Search" aria-label="Search" maxlength="64" data-hotkeys="s/" />
  <div class="book-search-spinner hidden"></div>
  <ul id="book-search-results"></ul>
</div>












  



  
  <ul>
    
      
        <li class="book-section-flat" >
          
  
  

  
    <input type="checkbox" id="section-074eed0fb8c6f9d99dfeff898388792f" class="toggle"  />
    <label for="section-074eed0fb8c6f9d99dfeff898388792f" class="flex justify-between">
      <a role="button" class="">计算机基础</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/git%E5%9F%BA%E7%A1%80/" class="">Git基础</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/linux%E5%9F%BA%E7%A1%80/" class="">Linux基础</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%9F%BA%E7%A1%80/" class="">操作系统基础</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/%E6%95%B0%E6%8D%AE%E5%BA%93%E5%9F%BA%E7%A1%80/" class="">数据库基础</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C%E5%9F%BA%E7%A1%80/" class="">计算机网络基础</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li class="book-section-flat" >
          
  
  

  
    <span>Golang</span>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-670eda717a06f31447c52422ec93a159" class="toggle"  />
    <label for="section-670eda717a06f31447c52422ec93a159" class="flex justify-between">
      <a role="button" class="">基础</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/%E5%9F%BA%E7%A1%80/go%E8%AF%AD%E8%A8%80%E5%9F%BA%E7%A1%80%E4%B8%89/" class="">go语言基础（三）</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/%E5%9F%BA%E7%A1%80/2021-12-27-gin%E6%A1%86%E6%9E%B6/" class="">gin框架</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/%E5%9F%BA%E7%A1%80/beego%E6%A1%86%E6%9E%B6/" class="">Beego框架</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/%E5%9F%BA%E7%A1%80/go%E8%AF%AD%E8%A8%80%E5%BA%95%E5%B1%82%E5%9F%BA%E7%A1%80/" class="">go语言底层基础</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/%E5%9F%BA%E7%A1%80/2022-05-24-gorm%E6%80%BB%E7%BB%93/" class="">Gorm总结</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/%E5%9F%BA%E7%A1%80/2021-12-20-benchmark%E6%B5%8B%E8%AF%95/" class="">benchmark测试</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/%E5%9F%BA%E7%A1%80/2021-04-07-go%E8%AF%AD%E8%A8%80%E5%9F%BA%E7%A1%80%E4%B8%80/" class="">2021 04 07 Go语言基础（一）</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/%E5%9F%BA%E7%A1%80/2021-10-26-go%E8%AF%AD%E8%A8%80%E5%9F%BA%E7%A1%80%E4%BA%8C/" class="">2021 10 26 Go语言基础（二）</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/%E5%9F%BA%E7%A1%80/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84-go/" class="">数据结构 Go</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-c453881a62c640f6a4cceec99c02477e" class="toggle"  />
    <label for="section-c453881a62c640f6a4cceec99c02477e" class="flex justify-between">
      <a role="button" class="">高阶</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/%E9%AB%98%E9%98%B6/go%E8%AF%AD%E8%A8%80%E9%AB%98%E9%98%B6%E4%B8%80/" class="">Go语言高阶（一）</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-ee53da12118bfd3e9b35f3e9494ab55b" class="toggle"  />
    <label for="section-ee53da12118bfd3e9b35f3e9494ab55b" class="flex justify-between">
      <a role="button" class="">LeetCode</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/leetcode/2021-10-14-golang%E5%8A%9B%E6%89%A3%E5%88%B7%E9%A2%98%E4%B8%80/" class="">golang力扣刷题（一）</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/leetcode/2021-11-04-golang%E5%8A%9B%E6%89%A3%E5%88%B7%E9%A2%98%E4%BA%8C/" class="">golang力扣刷题（二）</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/leetcode/%E5%BF%85%E5%88%B7top101/" class="">必刷top101</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/golang/leetcode/2021-10-28-leetcode%E7%AE%97%E6%B3%95%E6%80%BB%E7%BB%93/" class="">LeetCode算法总结</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li class="book-section-flat" >
          
  
  

  
    <span>区块链</span>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-76bfb65f46ce25a0ff78d6cc4ad47773" class="toggle"  />
    <label for="section-76bfb65f46ce25a0ff78d6cc4ad47773" class="flex justify-between">
      <a role="button" class="">Fabric</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/2021-05-08-fabric-sdk-go%E8%AF%A6%E8%A7%A3/" class="">fabric-sdk-go详解</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-1e3df3eda5cf08a9c7e8cc723288fefb" class="toggle"  />
    <label for="section-1e3df3eda5cf08a9c7e8cc723288fefb" class="flex justify-between">
      <a role="button" class="">环境测试</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E7%8E%AF%E5%A2%83%E6%B5%8B%E8%AF%95/2021-03-18-centos%E5%AE%89%E8%A3%85fabric1.2/" class="">centos安装fabric1.2</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E7%8E%AF%E5%A2%83%E6%B5%8B%E8%AF%95/2021-03-22-fabric%E7%BD%91%E7%BB%9C%E4%B8%AD%E7%9A%84%E6%8A%A5%E9%94%99%E4%BA%8C/" class="">2021 03 22 Fabric网络中的报错（二）</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E7%8E%AF%E5%A2%83%E6%B5%8B%E8%AF%95/2021-03-24-fabric%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/" class="">2021 03 24 Fabric环境搭建</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E7%8E%AF%E5%A2%83%E6%B5%8B%E8%AF%95/2021-03-25-fabric-solo%E8%8A%82%E7%82%B9%E6%B5%8B%E8%AF%95/" class="">2021 03 25 Fabric Solo节点测试</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E7%8E%AF%E5%A2%83%E6%B5%8B%E8%AF%95/2021-03-25-fabric%E5%A4%9A%E6%9C%BA%E6%90%AD%E5%BB%BA/" class="">2021 03 25 Fabric多机搭建</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E7%8E%AF%E5%A2%83%E6%B5%8B%E8%AF%95/2021-05-01-%E6%89%8B%E5%8A%A8%E7%94%9F%E6%88%90ca%E8%AF%81%E4%B9%A6%E6%90%AD%E5%BB%BAfabric%E7%BD%91%E7%BB%9C/" class="">2021 05 01 手动生成ca证书搭建fabric网络</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E7%8E%AF%E5%A2%83%E6%B5%8B%E8%AF%95/2021-12-20-%E9%83%A8%E7%BD%B2tape%E6%B5%8B%E8%AF%95/" class="">2021 12 20 部署tape测试</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E7%8E%AF%E5%A2%83%E6%B5%8B%E8%AF%95/fabric%E7%BD%91%E7%BB%9C%E4%B8%AD%E7%9A%84%E6%8A%A5%E9%94%99%E4%B8%80/" class="">Fabric网络中的报错（一）</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-25aef1d59a561fcefcaecb043ef8afd2" class="toggle"  />
    <label for="section-25aef1d59a561fcefcaecb043ef8afd2" class="flex justify-between">
      <a role="button" class="">配置文件</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/2021-03-29-configtx-yaml%E6%96%87%E4%BB%B6%E8%AF%A6%E8%A7%A3/" class="">2021 03 29 Configtx Yaml文件详解</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/2021-03-29-crypto-config-yaml%E6%96%87%E4%BB%B6%E8%AF%A6%E8%A7%A3/" class="">2021 03 29 Crypto Config Yaml文件详解</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/2021-03-30-config-yaml%E6%96%87%E4%BB%B6%E8%AF%A6%E8%A7%A3/" class="">2021 03 30 Config Yaml文件详解</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/2021-03-30-docker-compose-yaml%E6%96%87%E4%BB%B6%E8%AF%A6%E8%A7%A3/" class="">2021 03 30 Docker Compose Yaml文件详解</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/2021-05-01-cryptogen%E7%94%9F%E6%88%90%E7%9A%84%E8%AF%81%E4%B9%A6%E8%AF%A6%E8%A7%A3/" class="">2021 05 01 Cryptogen生成的证书详解</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/2022-04-14-%E5%8D%87%E7%BA%A7%E9%93%BE%E7%A0%81/" class="">升级链码</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/2021-04-15-fabric-ca%E8%AF%A6%E8%A7%A3/" class="">2021 04 15 Fabric Ca详解</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/2021-04-15-fabric1.4%E5%A4%9A%E9%80%9A%E9%81%93%E5%AE%9E%E9%AA%8C/" class="">2021 04 15 Fabric1.4多通道实验</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/2021-04-17-%E5%A6%82%E4%BD%95%E5%9C%A8%E5%B7%B2%E6%9C%89%E7%BB%84%E7%BB%87%E4%B8%AD%E5%A2%9E%E5%8A%A0%E8%8A%82%E7%82%B9/" class="">2021 04 17 如何在已有组织中增加节点</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/2021-05-02-fabric%E6%B5%8F%E8%A7%88%E5%99%A8%E6%90%AD%E5%BB%BA/" class="">2021 05 02 Fabric浏览器搭建</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/2021-05-10-%E6%99%BA%E8%83%BD%E5%90%88%E7%BA%A6/" class="">2021 05 10 智能合约</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/2022-02-25-fabric%E7%9B%B8%E5%85%B3%E6%9C%BA%E5%88%B6%E4%B8%8E%E5%8E%9F%E7%90%86/" class="">2022 02 25 Fabric相关机制与原理</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/fabric/2022-03-25-%E5%8C%BA%E5%9D%97%E9%93%BE%E7%BD%91%E7%BB%9C%E6%B7%BB%E5%8A%A0%E7%BB%84%E7%BB%87/" class="">2022 03 25 区块链网络添加组织</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-b07621083aa30b12de4c0333941e479f" class="toggle"  />
    <label for="section-b07621083aa30b12de4c0333941e479f" class="flex justify-between">
      <a role="button" class="">比特币</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/%E6%AF%94%E7%89%B9%E5%B8%81/2022-02-25-%E6%AF%94%E7%89%B9%E5%B8%81%E7%9B%B8%E5%85%B3%E6%9C%BA%E5%88%B6%E4%B8%8E%E5%8E%9F%E7%90%86/" class="">2022 02 25 比特币相关机制与原理</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-ff5477999ef29208270c84e8b56b2758" class="toggle"  />
    <label for="section-ff5477999ef29208270c84e8b56b2758" class="flex justify-between">
      <a role="button" class="">IPFS</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/ipfs/2021-06-02-ipfs%E7%A7%81%E6%9C%89%E7%BD%91%E7%BB%9C%E6%90%AD%E5%BB%BA/" class="">2021 06 02 IP Fs私有网络搭建</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/ipfs/2021-07-08-ipfs%E5%9F%BA%E6%9C%AC%E5%8E%9F%E7%90%86%E4%B8%80/" class="">2021 07 08 IP Fs基本原理（一）</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/ipfs/2021-07-12-ipfs-webui%E5%8F%AF%E8%A7%86%E5%8C%96%E5%B7%A5%E5%85%B7%E6%90%AD%E5%BB%BA/" class="">2021 07 12 Ipfs Webui可视化工具搭建</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/ipfs/2021-12-05-go-ipfs-api/" class="">2021 12 05 Go Ipfs API</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-77a0a17b06e8d04cfb0fba9952941706" class="toggle"  />
    <label for="section-77a0a17b06e8d04cfb0fba9952941706" class="flex justify-between">
      <a role="button" class="">密码学</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/%E5%AF%86%E7%A0%81%E5%AD%A6/2022-08-15-%E5%8C%BA%E5%9D%97%E9%93%BE%E5%AE%89%E5%85%A8%E5%9F%BA%E7%A1%80/" class="">区块链安全基础</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/%E5%AF%86%E7%A0%81%E5%AD%A6/2021-04-12-%E6%A4%AD%E5%9C%86%E6%9B%B2%E7%BA%BF%E5%8A%A0%E5%AF%86/" class="">椭圆曲线加密</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/%E5%AF%86%E7%A0%81%E5%AD%A6/2021-03-04-%E5%AF%86%E7%A0%81%E5%AD%A6%E5%9F%BA%E7%A1%80/" class="">密码学基础</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-2e4d10b323fd668021dbd532575d8790" class="toggle"  />
    <label for="section-2e4d10b323fd668021dbd532575d8790" class="flex justify-between">
      <a role="button" class="">Docker</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/docker/docker%E5%9F%BA%E7%A1%80/" class="">Docker基础</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/docker/dockerfile/" class="">Dockerfile</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/docker/2021-04-30-docker%E5%B8%B8%E7%94%A8%E7%9F%A5%E8%AF%86%E6%80%BB%E7%BB%93/" class="">docker常用知识总结</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-70383d7f28a7ae4bf840a844eb61aa16" class="toggle"  />
    <label for="section-70383d7f28a7ae4bf840a844eb61aa16" class="flex justify-between">
      <a role="button" class="">共识算法</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/%E5%85%B1%E8%AF%86%E7%AE%97%E6%B3%95/2022-03-26-raft%E5%85%B1%E8%AF%86%E7%AE%97%E6%B3%95/" class="">Raft共识算法</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8C%BA%E5%9D%97%E9%93%BE/%E5%85%B1%E8%AF%86%E7%AE%97%E6%B3%95/%E5%85%B1%E8%AF%86%E7%AE%97%E6%B3%95%E5%9F%BA%E7%A1%80/" class="">共识算法基础</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li class="book-section-flat" >
          
  
  

  
    <span>数据库</span>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-94f26238d1ca3b5bcd40eadc7a88d726" class="toggle"  />
    <label for="section-94f26238d1ca3b5bcd40eadc7a88d726" class="flex justify-between">
      <a role="button" class="">MySql</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E6%95%B0%E6%8D%AE%E5%BA%93/mysql/2021-04-20-mysql%E5%9F%BA%E7%A1%80%E6%80%BB%E7%BB%93/" class="">MySql基础总结</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E6%95%B0%E6%8D%AE%E5%BA%93/mysql/mac%E8%BF%9E%E6%8E%A5%E6%95%B0%E6%8D%AE%E5%BA%93%E6%89%80%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98/" class="">Mac连接数据库所遇到的问题</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-01e4ef5e6295826a1eab8f1a7114ec2c" class="toggle"  />
    <label for="section-01e4ef5e6295826a1eab8f1a7114ec2c" class="flex justify-between">
      <a role="button" class="">Redis</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E6%95%B0%E6%8D%AE%E5%BA%93/redis/2022-03-21-redis%E9%9B%86%E7%BE%A4%E6%90%AD%E5%BB%BA/" class="">Redis集群搭建</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E6%95%B0%E6%8D%AE%E5%BA%93/redis/2022-03-20-redis%E5%9F%BA%E7%A1%80/" class="">Redis基础</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E6%95%B0%E6%8D%AE%E5%BA%93/redis/2021-05-02-redis%E9%9D%A2%E8%AF%95%E6%80%BB%E7%BB%93/" class="">redis面试总结</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li class="book-section-flat" >
          
  
  

  
    <input type="checkbox" id="section-5f7b667081fbae0581cd216f66d5102f" class="toggle" checked />
    <label for="section-5f7b667081fbae0581cd216f66d5102f" class="flex justify-between">
      <a role="button" class="">博客</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8D%9A%E5%AE%A2/2022-08-27-%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BAhugo/" class="active">个人博客搭建Hugo</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/%E5%8D%9A%E5%AE%A2/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BAhexo/" class="">个人博客搭建Hexo</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
  </ul>











  
<ul>
  
  <li>
    <a href="https://gitee.com/chaincode" target="_blank" rel="noopener">
        Gitee
      </a>
  </li>
  
</ul>






</nav>




  <script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script>


 
      </div>
    </aside>

    <div class="book-page">
      <header class="book-header">
        
  <div class="flex align-center justify-between">
  <label for="menu-control">
    <img src="/svg/menu.svg" class="book-icon" alt="Menu" />
  </label>

  <strong>个人博客搭建Hugo</strong>

  <label for="toc-control">
    
    <img src="/svg/toc.svg" class="book-icon" alt="Table of Contents" />
    
  </label>
</div>


  
  <aside class="hidden clearfix">
    
  
<nav id="TableOfContents">
  <ul>
    <li>
      <ul>
        <li><a href="#环境安装">环境安装</a>
          <ul>
            <li><a href="#安装homebrew">安装Homebrew</a></li>
            <li><a href="#安装golang">安装Golang</a></li>
            <li><a href="#安装wget">安装wget</a></li>
            <li><a href="#安装hugo">安装Hugo</a></li>
          </ul>
        </li>
        <li><a href="#生成网站">生成网站</a>
          <ul>
            <li><a href="#生成站点">生成站点</a></li>
            <li><a href="#安装皮肤">安装皮肤</a></li>
            <li><a href="#添加内容">添加内容</a></li>
            <li><a href="#启动-hugo-服务器">启动 Hugo 服务器</a></li>
          </ul>
        </li>
        <li><a href="#hexo迁移hugo">Hexo迁移Hugo</a>
          <ul>
            <li><a href="#目录结构">目录结构</a></li>
          </ul>
        </li>
        <li><a href="#gitee部署">gitee部署</a></li>
      </ul>
    </li>
  </ul>
</nav>



  </aside>
  
 
      </header>

      
      
  <article class="markdown"><p>基于Macbook M2芯片（主要原因是换电脑了，同时自己主学go语言，于是打算将Hexo换成Hugo，练练手)</p>
<pre tabindex="0"><code>https://copyfuture.com/blogs-details/20191229203259169ljtxcq9vmlzjyvf
http://scarletsky.github.io/2019/05/02/migrate-hexo-to-hugo/
https://www.tomczhen.com/2019/06/04/getting-start-blog-with-hugo/
https://lequ7.com/guan-yu-hugo-bo-ke-qian-yi-zhi-lu-cong-hexo-huan-cheng-hugo.html
https://blog.csdn.net/hqweay/article/details/101233371
</code></pre><p>搭建过程从头开始</p>
<h2 id="环境安装">
  环境安装
  <a class="anchor" href="#%e7%8e%af%e5%a2%83%e5%ae%89%e8%a3%85">#</a>
</h2>
<h3 id="安装homebrew">
  安装Homebrew
  <a class="anchor" href="#%e5%ae%89%e8%a3%85homebrew">#</a>
</h3>
<pre tabindex="0"><code>/bin/zsh -c &#34;$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)&#34;
</code></pre><p>根据提示安装Git</p>
<p><img src="https://blockchaincode.oss-cn-hangzhou.aliyuncs.com/Hexo_img/202208311906878.png" alt="" /></p>
<p>根据提示往下选择</p>
<pre tabindex="0"><code>运行
source /Users/wangb/.zprofile
</code></pre><p>运行brew doctor根据提示处理现有的问题</p>
<pre tabindex="0"><code>brew doctor
</code></pre><p><img src="https://blockchaincode.oss-cn-hangzhou.aliyuncs.com/Hexo_img/202208311949411.png" alt="" /></p>
<h3 id="安装golang">
  安装Golang
  <a class="anchor" href="#%e5%ae%89%e8%a3%85golang">#</a>
</h3>
<p>查看可安装的golang版本</p>
<pre tabindex="0"><code>brew search go  //最好使用手动安装，m2系列brew安装的go会出一些小问题 没找到什么原因
</code></pre><p>安装go环境：</p>
<pre tabindex="0"><code>brew install go@1.18//改成你喜欢的版本号
</code></pre><p>在.zshrc 文件中追加配置</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>vim  ~/.zshrc
</span></span></code></pre></div><p>在文件最后输入一下内容：</p>
<pre tabindex="0"><code>export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOROOT/bin:$GOBIN
export GO111MODULE=on
</code></pre><p>按 <code>Esc</code> 键退回一般模式，然后输入 <code>:wq</code> 命令并回车保存退出文件。再使用以下命令使变量立即生效。</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>source .zshrc
</span></span></code></pre></div><p>由于Golang的官方代理源速度慢有时候会出现包不能下载的情况，我们使用以下命令把代理源设置为国内的代理源。</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>go env -w GOPROXY<span style="color:#f92672">=</span>https://goproxy.cn,direct
</span></span></code></pre></div><p>使用以下命令查看Golang版本信息。</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>go version
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>go1.16.4 linux/amd64
</span></span></code></pre></div><p>使用以下命令查看Golang环境变量配置。</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>go env
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>GO111MODULE<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;on&#34;</span>
</span></span><span style="display:flex;"><span>GOARCH<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;amd64&#34;</span>
</span></span><span style="display:flex;"><span>GOBIN<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;&#34;</span>
</span></span><span style="display:flex;"><span>GOCACHE<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;/root/.cache/go-build&#34;</span>
</span></span><span style="display:flex;"><span>GOENV<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;/root/.config/go/env&#34;</span>
</span></span><span style="display:flex;"><span>GOEXE<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;&#34;</span>
</span></span><span style="display:flex;"><span>GOFLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;&#34;</span>
</span></span><span style="display:flex;"><span>GOHOSTARCH<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;amd64&#34;</span>
</span></span><span style="display:flex;"><span>GOHOSTOS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;linux&#34;</span>
</span></span><span style="display:flex;"><span>GONOPROXY<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;&#34;</span>
</span></span><span style="display:flex;"><span>GONOSUMDB<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;&#34;</span>
</span></span><span style="display:flex;"><span>GOOS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;linux&#34;</span>
</span></span><span style="display:flex;"><span>GOPATH<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;/root/go&#34;</span>
</span></span><span style="display:flex;"><span>GOPRIVATE<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;&#34;</span>
</span></span><span style="display:flex;"><span>GOPROXY<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https://goproxy.cn,direct&#34;</span>
</span></span><span style="display:flex;"><span>GOROOT<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;/usr/lib/go-1.13&#34;</span>
</span></span><span style="display:flex;"><span>GOSUMDB<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;sum.golang.org&#34;</span>
</span></span><span style="display:flex;"><span>GOTMPDIR<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;&#34;</span>
</span></span><span style="display:flex;"><span>GOTOOLDIR<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;/usr/lib/go-1.13/pkg/tool/linux_amd64&#34;</span>
</span></span><span style="display:flex;"><span>GCCGO<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;gccgo&#34;</span>
</span></span><span style="display:flex;"><span>AR<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;ar&#34;</span>
</span></span><span style="display:flex;"><span>CC<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;gcc&#34;</span>
</span></span><span style="display:flex;"><span>CXX<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;g++&#34;</span>
</span></span><span style="display:flex;"><span>CGO_ENABLED<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;1&#34;</span>
</span></span><span style="display:flex;"><span>GOMOD<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;/dev/null&#34;</span>
</span></span><span style="display:flex;"><span>CGO_CFLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;-g -O2&#34;</span>
</span></span><span style="display:flex;"><span>CGO_CPPFLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;&#34;</span>
</span></span><span style="display:flex;"><span>CGO_CXXFLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;-g -O2&#34;</span>
</span></span><span style="display:flex;"><span>CGO_FFLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;-g -O2&#34;</span>
</span></span><span style="display:flex;"><span>CGO_LDFLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;-g -O2&#34;</span>
</span></span><span style="display:flex;"><span>PKG_CONFIG<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;pkg-config&#34;</span>
</span></span><span style="display:flex;"><span>GOGCCFLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build410299436=/tmp/go-build -gno-record-gcc-switches&#34;</span>
</span></span></code></pre></div><h3 id="安装wget">
  安装wget
  <a class="anchor" href="#%e5%ae%89%e8%a3%85wget">#</a>
</h3>
<pre tabindex="0"><code>brew install wget
</code></pre><h3 id="安装hugo">
  安装Hugo
  <a class="anchor" href="#%e5%ae%89%e8%a3%85hugo">#</a>
</h3>
<pre tabindex="0"><code>brew install hugo
</code></pre><pre tabindex="0"><code>hugo version
</code></pre><h2 id="生成网站">
  生成网站
  <a class="anchor" href="#%e7%94%9f%e6%88%90%e7%bd%91%e7%ab%99">#</a>
</h2>
<h3 id="生成站点">
  生成站点
  <a class="anchor" href="#%e7%94%9f%e6%88%90%e7%ab%99%e7%82%b9">#</a>
</h3>
<pre tabindex="0"><code>hugo new site MyHu
</code></pre><p><img src="https://blockchaincode.oss-cn-hangzhou.aliyuncs.com/Hexo_img/202208312112835.png" alt="" /></p>
<h3 id="安装皮肤">
  安装皮肤
  <a class="anchor" href="#%e5%ae%89%e8%a3%85%e7%9a%ae%e8%82%a4">#</a>
</h3>
<pre tabindex="0"><code>git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book
</code></pre><pre tabindex="0"><code>echo theme = \&#34;ananke\&#34; &gt;&gt; config.toml
</code></pre><h3 id="添加内容">
  添加内容
  <a class="anchor" href="#%e6%b7%bb%e5%8a%a0%e5%86%85%e5%ae%b9">#</a>
</h3>
<pre tabindex="0"><code>hugo new posts/my-first-post.md
</code></pre><h3 id="启动-hugo-服务器">
  启动 Hugo 服务器
  <a class="anchor" href="#%e5%90%af%e5%8a%a8-hugo-%e6%9c%8d%e5%8a%a1%e5%99%a8">#</a>
</h3>
<pre tabindex="0"><code>hugo server -D
</code></pre><h2 id="hexo迁移hugo">
  Hexo迁移Hugo
  <a class="anchor" href="#hexo%e8%bf%81%e7%a7%bbhugo">#</a>
</h2>
<h3 id="目录结构">
  目录结构
  <a class="anchor" href="#%e7%9b%ae%e5%bd%95%e7%bb%93%e6%9e%84">#</a>
</h3>
<p><img src="https://blockchaincode.oss-cn-hangzhou.aliyuncs.com/202209011745592.png" alt="" /></p>
<p><img src="https://blockchaincode.oss-cn-hangzhou.aliyuncs.com/202209011746552.png" alt="" /></p>
<h4 id="docs目录">
  docs目录
  <a class="anchor" href="#docs%e7%9b%ae%e5%bd%95">#</a>
</h4>
<p><img src="https://blockchaincode.oss-cn-hangzhou.aliyuncs.com/202209011747041.png" alt="" /></p>
<h4 id="博客目录">
  博客目录
  <a class="anchor" href="#%e5%8d%9a%e5%ae%a2%e7%9b%ae%e5%bd%95">#</a>
</h4>
<p><img src="https://blockchaincode.oss-cn-hangzhou.aliyuncs.com/202209011747022.png" alt="" /></p>
<p><img src="https://blockchaincode.oss-cn-hangzhou.aliyuncs.com/202209011747613.png" alt="" /></p>
<pre tabindex="0"><code>bookFlatSection: true   //加粗，并跟前后空格隔开，后面的顶格
bookCollapseSection: true   //折叠效果
</code></pre><p>效果如下</p>
<p><img src="https://blockchaincode.oss-cn-hangzhou.aliyuncs.com/202209011749134.png" alt="" /></p>
<p><strong>本博客目录设置是基于Hugo-book主题设置</strong></p>
<h5 id="主题configtoml文件">
  主题config.toml文件
  <a class="anchor" href="#%e4%b8%bb%e9%a2%98configtoml%e6%96%87%e4%bb%b6">#</a>
</h5>
<pre tabindex="0"><code>baseURL = &#39;http://example.org/&#39;
languageCode = &#39;zh-cn&#39;
title = &#39;Soulmate&#39;
theme = &#34;hugo-book&#34;

# Needed for mermaid/katex shortcodes
[markup]
[markup.goldmark.renderer]
  unsafe = true

[markup.tableOfContents]
  startLevel = 1

[menu]
# [[menu.before]]
[[menu.after]]
  name = &#34;Gitee&#34;
  url = &#34;https://gitee.com/chaincode&#34;
  weight = 10

[[menu.after]]
  name = &#34;还没想好&#34;
  url = &#34;https://&#34;
  weight = 20

# （可选）如果您使用它来跟踪您的网站，请设置 Google Analytics。
# 始终放在配置文件的最前面，否则不起作用
#googleAnalytics = &#34;UA-XXXXXXXXX-X&#34;

# （可选）如果您提供 Disqus 短名称，评论将启用
# 所有页面。
#disqusShortname = &#34;my-site&#34;

# （可选）如果您在文件名中使用大写字母，请将此设置为 true
disablePathToLower = true

# （可选）将此设置为 true 以启用 &#39;Last Modified by&#39; 日期和 git author&#39;doc&#39; 类型页面的信息。
#enableGitInfo = true

# （可选）主题用于文档用途，因此它不呈现分类。
# 您可以使用下面的配置删除相关文件
#disableKinds = [&#39;taxonomy&#39;, &#39;taxonomyTerm&#39;]

[params]
  # (Optional, default light) Sets color theme: light, dark or auto.
  # Theme &#39;auto&#39; switches between dark and light modes based on browser/os preferences
    # （可选，默认光）设置颜色主题：light, dark or auto.
  # 主题“自动”根据浏览器/操作系统偏好在暗模式和亮模式之间切换
  BookTheme = &#39;auto&#39;

  # （可选，默认为 true）控制页面右侧的目录可见性。
  # 开始和结束级别可以通过 markup.tableOfContents 设置来控制。
  # 你也可以在front matter中每页指定这个参数。
  BookToC = true

  # （可选，默认无）设置图书徽标的路径。如果标志是
  # /static/logo.png 那么路径就是&#39;logo.png&#39;
  #BookLogo = &#39;logo.png&#39;

  # （可选，默认无）设置叶子包渲染为侧边菜单
  # 如果没有指定文件结构和权重，将被使用
  # 已弃用，将于 2022 年 6 月移除
  #BookMenuBundle = &#39;/menu&#39;

  # （可选，默认文档）指定要呈现为菜单的内容部分
  # 您还可以将值设置为“*”以将所有部分呈现到菜单
  BookSection = &#39;docs&#39;

  # 设置源仓库位置。
  # 用于“上次修改”和“编辑此页面”链接。
  BookRepo = &#39;https://github.com/alex-shpak/hugo-book&#39;

  # 指定链接的提交部分到“doc”页面的页面的最后修改提交哈希类型。
  # 如果设置了“BookRepo”参数，则为必需。
  # 用于构造由 BookRepo/BookCommitPath/&lt;commit-hash&gt; 组成的 URL 的值
  # Github 使用&#39;commit&#39;，Bitbucket 使用&#39;commits&#39;
  #BookCommitPath = &#39;commit&#39;

  # 为“doc”页面类型启用“编辑此页面”链接。
  # 默认禁用。取消注释以启用。需要“BookRepo”参数。
  # 路径必须指向站点目录。
  #BookEditPath = &#39;edit/master/exampleSite&#39;

  # （可选，默认为 2006 年 1 月 2 日）配置页面使用的日期格式
  # - 在 git 信息中
  # - 在博客文章中
  BookDateFormat = &#39;Jan 2, 2006&#39;

  # （可选，默认 true）使用 flexsearch 启用搜索功能，
  # 索引是动态构建的，因此它可能会降低您的网站速度。
  # 索引配置可以在每个语言的 i18n 文件夹中进行调整。
  BookSearch = true

  # （可选，默认 true）在页面上启用评论模板
  # 默认情况下 partials/docs/comments.html 包含 Disqus 模板
  # See https://gohugo.io/content-management/comments/#configure-disqus
  # 可以被页面frontmatter中的相同参数覆盖
  #BookComments = true
</code></pre><h2 id="gitee部署">
  gitee部署
  <a class="anchor" href="#gitee%e9%83%a8%e7%bd%b2">#</a>
</h2>
<p>生成静态文件</p>
<pre tabindex="0"><code>hugo
</code></pre><p>git全局设置（第一次使用）</p>
<pre tabindex="0"><code>Git 全局设置:   第一次需要设置
git config --global user.name &#34;Soulmate&#34;
git config --global user.email &#34;xxxxxxx@163.com&#34;
</code></pre><p>git上传仓库(我在旧仓库上传覆盖，没有仓库需要创建)</p>
<pre tabindex="0"><code>cd public
git init   初始化
git add .
git commit -m &#34;first commit&#34; 
git remote add origin https://gitee.com/chaincode/chaincode.git
git push -u origin master -f 
</code></pre><p>进入仓库更新一下 Gitee Pages 服务</p>
<p><strong>大功告成</strong></p>
</article>
 
      

      <footer class="book-footer">
        
  <div class="flex flex-wrap justify-between">





</div>



  <script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script>


 
        
      </footer>

      
  
  <div class="book-comments">

</div>
  
 

      <label for="menu-control" class="hidden book-menu-overlay"></label>
    </div>

    
    <aside class="book-toc">
      <div class="book-toc-content">
        
  
<nav id="TableOfContents">
  <ul>
    <li>
      <ul>
        <li><a href="#环境安装">环境安装</a>
          <ul>
            <li><a href="#安装homebrew">安装Homebrew</a></li>
            <li><a href="#安装golang">安装Golang</a></li>
            <li><a href="#安装wget">安装wget</a></li>
            <li><a href="#安装hugo">安装Hugo</a></li>
          </ul>
        </li>
        <li><a href="#生成网站">生成网站</a>
          <ul>
            <li><a href="#生成站点">生成站点</a></li>
            <li><a href="#安装皮肤">安装皮肤</a></li>
            <li><a href="#添加内容">添加内容</a></li>
            <li><a href="#启动-hugo-服务器">启动 Hugo 服务器</a></li>
          </ul>
        </li>
        <li><a href="#hexo迁移hugo">Hexo迁移Hugo</a>
          <ul>
            <li><a href="#目录结构">目录结构</a></li>
          </ul>
        </li>
        <li><a href="#gitee部署">gitee部署</a></li>
      </ul>
    </li>
  </ul>
</nav>


 
      </div>
    </aside>
    
  </main>

  
</body>
</html>












